package cn.roadtrip.utilmodule.util.enumpck;

/**
 * 抱团旅游订单商家商品核销状态
 */
public enum Enum_TravelGroupTourOrderShopProductStats {
    WaitOff("WaitOff", "待核销"),
    Finished("Finished", "已核销"),
    Backoff("Backoff", "已退款"),
    Cancel("Cancel", "取消");

    private String s;
    private String title;

    Enum_TravelGroupTourOrderShopProductStats(String s, String title) {
        this.s = s;
        this.title = title;
    }

    Enum_TravelGroupTourOrderShopProductStats(String s) {
        this.s = s;
        this.title = Enum_HotelRoomType.parseCode(s).getTitle();
    }

    public String getTitle() {
        return this.title;
    }

    public String getCode() {
        return this.s;
    }

    public static final Enum_TravelGroupTourOrderShopProductStats parseCode(String code) {
        switch (code) {
            case "WaitOff":
                return WaitOff;
            case "Finished":
                return Finished;
            case "Backoff":
                return Backoff;
            case "Cancel":
                return Cancel;
        }
        return null;
    }

    @Override
    public String toString() {
        return "(code:%s, title:%s)".formatted(this.s, this.title);
    }

}
